home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Education / Library Hyper Card Templates / Open Stack / Help / card_3184.txt < prev    next >
Encoding:
Text File  |  1987-12-04  |  4.2 KB  |  136 lines

  1. -- card: 3184 from stack: in
  2. -- bmap block id: 7419
  3. -- flags: 0000
  4. -- background id: 3656
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0002
  11. -- rect: left=55 top=116 right=216 bottom=407
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 20
  16. -- text size: 18
  17. -- style flags: 0
  18. -- line height: 24
  19. -- part name: HelpField
  20. ----- HyperTalk script -----
  21. --  Hello up there!  You've reached the script window of this field!
  22. --  This is where all the work is done.  The script that resides here
  23. --  waits for a MESSAGE, then does whatever it is it's supposed to do.
  24. --  Here's an example of a script:
  25. _________________________________________________
  26. --on mouseWithin
  27. --answer "See?  It really works!"
  28. --end mouseWithin
  29. __________________________________________________
  30. --  We stick on the double hyphen at the beginning of each line so that
  31. --  HyperCard knows it isn't supposed to pay attention.
  32. --   Do you want to see a script in action?  All right: use the mouse to
  33. --  wipe out the hyphens from the script between the lines.
  34. --  Click "OK" down below, click on the upper left square on the
  35. --  toolbox (the one with the pointing hand) and move the hand into the
  36. --  field. Then see if you can get back to me here (a shortcut is to
  37. --  select the Field tool -- the one in the upper right of the Toolbox--
  38. --  and doubleclick the field while holding down the Shift key).
  39. --                       More below.
  40. --
  41. --  Did you notice that the middle line of the script moved over a notch
  42. --  or two? That's how HyperTalk, the HyperCard programming language,
  43. --  neatens up its programs.
  44. --  "mouseWithin" was a MESSAGE that YOU sent to this field when you
  45. --  moved the "mouse Within" the field.  When you send a MESSAGE to an
  46. --  OBJECT like a field (Buttons, cards, backgrounds and stacks are
  47. --  other OBJECTS) the MESSAGE looks for a HANDLER, which is the
  48. --  MESSAGE with the word "ON" tacked onto the front of it.
  49. --  Want to try a neat trick?  Click "OK" down below again, then go
  50. --  to the "GO" menu in the menu bar.  Select "MESSAGE".  Then type
  51. --  the sentence:  send mouseWithin to cardfield "HelpField" (the phrase
  52. --  is on the card.) Go ahead, try it. Then come back here and stick the
  53. --  hyphens back onto the script between the double lines above before
  54. --  moving on to the next card.
  55.  
  56.  
  57.  
  58. -- part 2 (field)
  59. -- low flags: 00
  60. -- high flags: 0004
  61. -- rect: left=2 top=24 right=88 bottom=483
  62. -- title width / last selected line: 0
  63. -- icon id / first selected line: 0 / 0
  64. -- text alignment: 0
  65. -- font id: 20
  66. -- text size: 14
  67. -- style flags: 256
  68. -- line height: 18
  69. -- part name: 
  70.  
  71.  
  72. -- part 4 (button)
  73. -- low flags: 00
  74. -- high flags: 8003
  75. -- rect: left=350 top=316 right=338 bottom=450
  76. -- title width / last selected line: 0
  77. -- icon id / first selected line: 0 / 0
  78. -- text alignment: 1
  79. -- font id: 0
  80. -- text size: 12
  81. -- style flags: 0
  82. -- line height: 16
  83. -- part name: Continue...
  84. ----- HyperTalk script -----
  85. on mouseUp
  86.   go to next card
  87. end mouseUp
  88.  
  89.  
  90.  
  91. -- part 5 (button)
  92. -- low flags: 00
  93. -- high flags: 8003
  94. -- rect: left=25 top=316 right=338 bottom=125
  95. -- title width / last selected line: 0
  96. -- icon id / first selected line: 0 / 0
  97. -- text alignment: 1
  98. -- font id: 0
  99. -- text size: 12
  100. -- style flags: 0
  101. -- line height: 16
  102. -- part name: Previous page
  103. ----- HyperTalk script -----
  104. on mouseUp
  105.   go to prev card
  106. end mouseUp
  107.  
  108.  
  109.  
  110. -- part 6 (button)
  111. -- low flags: 00
  112. -- high flags: 8003
  113. -- rect: left=191 top=317 right=339 bottom=291
  114. -- title width / last selected line: 0
  115. -- icon id / first selected line: 0 / 0
  116. -- text alignment: 1
  117. -- font id: 0
  118. -- text size: 12
  119. -- style flags: 0
  120. -- line height: 16
  121. -- part name: Directory
  122. ----- HyperTalk script -----
  123. on mouseUp
  124.   go to card id 2919 of stack "IntroCard"
  125. end mouseUp
  126.  
  127.  
  128.  
  129.  
  130. -- part contents for card part 1
  131. ----- text -----
  132. This is a field.  Click on the upper right square in  the "Tools", then double click in this field.  A box will  appear.  Study it for a moment, then click on the button that says "Script".
  133.  
  134. -- part contents for card part 2
  135. ----- text -----
  136. This is a "question" card. It throws you into the thickest part of HyperCard.  Write down as many questions as you can while doing this card, then click "Continue"!